package com.gy.pinduoduo;

import java.util.Scanner;

public class demo2 {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int len = scan.nextInt(), i = 0, j = 0, count = 0;
        scan.nextLine();
        String s1 = scan.nextLine();
        String s2 = scan.nextLine();
        //得到对应字母个数
        int[] ch1 = new int[26];
        int[] ch2 = new int[26];
        for(i = 0 ; i < len ; i++){
            ch1[s1.charAt(i)-'a']++;
            ch2[s2.charAt(i)-'a']++;
        }
        i = 0;
        while(i < 26 && j < 26){
            if(ch1[i] > ch2[j]){
                count += ch2[j] * Math.abs(i-j);
                ch1[i] -= ch2[j];
                do{j++;}while(j < 26 && ch2[j] == 0);
            }else if(ch1[i] < ch2[j]){
                count += ch1[i] * Math.abs(i-j);
                ch2[j] -= ch1[i];
                do{i++;}while(i < 26 && ch1[i] == 0);
            }else{
                count += ch1[i] * Math.abs(i-j);
                do{j++;}while(j < 26 && ch2[j] == 0);
                do{i++;}while(i < 26 && ch1[i] == 0);
            }
        }
        System.out.println(count);
    }

}
